The present invention relates to electronic data processing, and more particularly concerns efficient frame updating of animated graphics.
From the earliest days of graphics animation, designers and artists have realized that a great deal of effort is wasted by redrawing an entire scene or image for the next frame when only a part of the current frame changes between the two frames. Long before the advent of computer graphics, xe2x80x9ctweenersxe2x80x9d in the motion-picture industry employed different layers for portions of a scene that stayed constant from one cel to the next, and redrew the changing portions on a separate overlay layer.
Computer programs have always attempted to avoid unnecessary manipulations of data. For example, all word processors avoid recopying an active text file that has not been changed since it was loaded. These and other programs frequently set a xe2x80x9cdirty bitxe2x80x9d associated with a file whenever the file is modified such that a previous copy is no longer current.
Graphics animation programs have adopted the dirty-bit concept. Some conventional rendering programs divide a two-dimensional image into subareas such as small rectangles, then track modifications to each rectangle separately. Only the combination of the parts that changed in the previous frame and those that will change in the current frame are updated. However, these subareas have fixed sizes and/or locations, and
Although higher computer speed and larger memory size enables brute-force and other conventional update techniques to achieve higher speed, there always remains a need to use all available approaches to furthering this goal, especially for presentations that are animated in real time.
One approach to increasing frame-update speed in graphic animation is to refine the determination of which parts of an image have not changed, and therefore need not be updated. The present invention produces successive frames of an image represented as a hierarchical scene graph in a declarative modeling language. It encodes creation-time information in the elements of the graph to eliminate unnecessary rendering of graph elements that have not changed since the preceding frame. The hierarchical structure can also optionally be employed to process multiple elements as single units rather than considering each of them separately. For example, a search for unchanged elements can stop at an unchanged aggregate element, and need not search any of its child elements in the scene graph. As another example, multiple changed nodes can be tested to determined whether they can be rendered more efficiently as a single element, then merged if so.